import { _decorator, Component, Label, Node } from 'cc';
const { ccclass, property } = _decorator;

@ccclass('FruitDiamond')
export class FruitDiamond extends Component {

	show(str: string){
		let np = new mtec.NudityPromise<Node>();
		this.node.active = true;
		this.node.getChildByName('lbl-diamond').getComponent(Label).string = str;
		mtec.delay(1.3, ()=>np.resolve(this.node));
		return np.promise;
	}
}
